﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace CardAlbumWcfService
{
    [ServiceContract]
    public interface ICardAlbumService
    {
        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "GetData/{cardId}")]
        CardDTO GetCardById(string cardId);
    }

    [DataContract]
    public class CardDTO
    {
        [DataMember]
        public string Description { get; set; }

        [DataMember]
        public string UploadDate { get; set; }

        [DataMember]
        public string UploaderName { get; set; }

        [DataMember]
        public List<CommentDTO> Comments { get; set; }
    }

    [DataContract]
    public class CommentDTO
    {
        [DataMember]
        public string Author { get; set; }

        [DataMember]
        public string Title { get; set; }

        [DataMember]
        public string Content { get; set; }
    }
}
